/**
 * Package domain
 */
package teamrocket.domain; // $codepro.audit.disable packagePrefixNamingConvention

import java.io.Serializable;
import java.util.Date;
import java.util.logging.Level;

/**
 * Represents a procedure in the database
 * @author Stephen
 *
 */
import teamrocket.logging.TLogger;

/**
 * This class creates a procedure that includes data such as
 * the date of the procedure, the name of the procedure,
 * the cost of the procedure, which patient is involved in the procedure,
 * and the doctor who is performing the procedure.
 * @author James Zhang, Juan Llanes, Stephen Tapper, Will Barr
 * @version 1.0
 */
public class Procedure implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * Field dateOfProcedure.
	 */
	private Date dateOfProcedure;
	
	/**
	 * Field procedureName.
	 */
	private String procedureName;
	
	/**
	 * Field performedBy.
	 */
	private int performedBy;
	
	/**
	 * Field cost.
	 */
	private float cost;
	
	/**
	 * Field patient.
	 */
	private int patient;
	
	/**
	 * Creates a procedure object in memory
	 * @param dateOfProcedure
	 * @param procedureName
	 * @param performedBy
	 * @param cost
	 * @param patient
	 */
	public Procedure(Date dateOfProcedure, String procedureName,
			int performedBy, float cost, int patient) {
		this.dateOfProcedure = dateOfProcedure;
		this.procedureName = procedureName;
		this.performedBy = performedBy;
		this.cost = cost;
		this.patient = patient;
		TLogger.getInstance().getLogger().log(Level.INFO,
				"Creating new Procedure " + procedureName +
				" for Patient " + patient);
	}
	
	/**
	 * Method getDateOfProcedure.
	 * @return Date
	 */
	public Date getDateOfProcedure() {
		return dateOfProcedure;
	}
	
	/**
	 * Method setDateOfProcedure.
	 * @param dateOfProcedure Date
	 */
	public void setDateOfProcedure(Date dateOfProcedure) {
		this.dateOfProcedure = dateOfProcedure;
	}
	
	/**
	 * Method getProcedureName.
	 * @return String
	 */
	public String getProcedureName() {
		return procedureName;
	}
	
	/**
	 * Method setProcedureName.
	 * @param procedureName String
	 */
	public void setProcedureName(String procedureName) {
		this.procedureName = procedureName;
	}
	
	/**
	 * Method getPerformedBy.
	 * @return int
	 */
	public int getPerformedBy() {
		return performedBy;
	}
	
	/**
	 * Method setPerformedBy.
	 * @param performedBy int
	 */
	public void setPerformedBy(int performedBy) {
		this.performedBy = performedBy;
	}
	
	/**
	 * Method getCost.
	 * @return float
	 */
	public float getCost() {
		return cost;
	}
	
	/**
	 * Method setCost.
	 * @param cost float
	 */
	public void setCost(float cost) {
		this.cost = cost;
	}
	
	/**
	 * Method getPatient.
	 * @return int
	 */
	public int getPatient() {
		return patient;
	}
	
	/**
	 * Method setPatient.
	 * @param patient int
	 */
	public void setPatient(int patient) {
		this.patient = patient;
	}
	
	@Override // $codepro.audit.disable methodJavadoc
	public String toString() {
		return procedureName;
	}
}
